#ifndef ENDRAWCONTEXT_H
#define ENDRAWCONTEXT_H

#include <enmodule.h>
#include <engraphicsview.h>
#include <QTimer>

/* This class contains the QGraphicsView/QGraphicsScene setup as well the timers running draw and peripheral updates.
  Additionally, an EnModule is loaded from file that sets up the EnBody list, background, as well as any other graphics objects
  and their location.*/

class EnDrawContext : public QObject
{
    Q_OBJECT

public:
    EnDrawContext();
    ~EnDrawContext();
    void loadModule( EnModule* m );
    EnGraphicsView* getView();
    void start();
    EnModule* getModule();

public slots:
    void addBody( EnBody* body );
    //void drawFrame();
    //void logicFrame();

private:
    EnModule* module;
    EnGraphicsView* view;
};

#endif // ENDRAWCONTEXT_H
